﻿using Basic.FormRemoteModel;
using SqlSugar;

namespace Basic.FormModel.DB
{
    [SugarTable("PhysicalQueryColumn")]
    public class DBPhysicalQueryColumn
    {
        [SugarColumn(IsPrimaryKey = true)]
        public long Id { get; set; }

        public long FormId
        {
            get;
            set;
        }

        public long TableId
        {
            get;
            set;
        }

        public long GroupId
        {
            get;
            set;
        }

        public string ColLabel
        {
            get;
            set;
        }

        public string ColName
        {
            get;
            set;
        }

        public PhyTableDataType DataType
        {
            get;
            set;
        }
        public FormColumnFuncType FuncType
        {
            get;
            set;
        }
        public PhyColShowMode ShowMode
        {
            get;
            set;
        }
        public long? DictId { get; set; }

        public long? SourceCol
        {
            get;
            set;
        }
        public int? Width { get; set; }

        /// <summary>
        /// 长度
        /// </summary>
        public short ColLen
        {
            get;
            set;
        }
        /// <summary>
        /// 小数位精度
        /// </summary>
        public short? Precision
        {
            get;
            set;
        }
        public bool IsNull
        {
            get;
            set;
        }
        public bool IsHidden
        {
            get;
            set;
        }
        public bool IsQueryHide
        {
            get;
            set;
        }
        public ColAlign Align { get; set; }

        public string DefValue { get; set; }

        [SugarColumn(IsJson = true)]
        public Dictionary<string, object> ColumnSet
        {
            get;
            set;
        }
        public int Sort
        {
            get;
            set;
        }
        public bool IsSystem
        {
            get;
            set;
        }
    }
}
